<html>
<head><meta charset="utf-8"><title>rust-analyzer#1021 · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html">rust-analyzer#1021</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="161479535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161479535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161479535">(Mar 22 2019 at 20:10)</a>:</h4>
<p>Is there a way to re-export a module when running tests only? Doing <code>#[cfg(test)] pub mod test_utils;</code> builds fine, but can't be resolved during <code>cargo test</code></p>



<a name="161479846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161479846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161479846">(Mar 22 2019 at 20:14)</a>:</h4>
<p>The import itself is inside a test module, so I had hoped for it to work</p>



<a name="161479848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161479848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161479848">(Mar 22 2019 at 20:14)</a>:</h4>
<p>Error here: <a href="https://travis-ci.org/rust-analyzer/rust-analyzer/jobs/510048576#L522" target="_blank" title="https://travis-ci.org/rust-analyzer/rust-analyzer/jobs/510048576#L522">https://travis-ci.org/rust-analyzer/rust-analyzer/jobs/510048576#L522</a></p>



<a name="161479865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161479865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161479865">(Mar 22 2019 at 20:14)</a>:</h4>
<p>answered on the issue :) Basically , I wonder if we can fix proptest</p>



<a name="161479877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161479877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161479877">(Mar 22 2019 at 20:14)</a>:</h4>
<p>is there at least an issue on proptest's repo about WASM?</p>



<a name="161479927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161479927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161479927">(Mar 22 2019 at 20:15)</a>:</h4>
<p>Hmm let me see, didn't check that yet</p>



<a name="161480073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161480073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161480073">(Mar 22 2019 at 20:17)</a>:</h4>
<p>Doesn't look like it, I'll look into it</p>



<a name="161481153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161481153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161481153">(Mar 22 2019 at 20:31)</a>:</h4>
<p>It's also weird that you can't re-use cfg-specific code very easily across crates, but maybe that's just a limitation of the current import system</p>



<a name="161519369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161519369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161519369">(Mar 23 2019 at 10:28)</a>:</h4>
<p>Proptest already has the forking stuff marked as optional, it's just enabled by default: <a href="https://altsysrq.github.io/proptest-book/proptest/forking.html" target="_blank" title="https://altsysrq.github.io/proptest-book/proptest/forking.html">https://altsysrq.github.io/proptest-book/proptest/forking.html</a></p>



<a name="161519395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161519395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161519395">(Mar 23 2019 at 10:29)</a>:</h4>
<p>Since RA doesn't use proptest timeouts, we can safely turn that off  by using <code>default-features = false</code></p>



<a name="161519468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161519468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161519468">(Mar 23 2019 at 10:30)</a>:</h4>
<p>Sadly there's still more problems around platform-specific string handling in proptest: <a href="https://github.com/AltSysrq/proptest/blob/d1c4b049337d2f75dd6f49a095115f7c532e5129/proptest/src/arbitrary/_std/env.rs#L89" target="_blank" title="https://github.com/AltSysrq/proptest/blob/d1c4b049337d2f75dd6f49a095115f7c532e5129/proptest/src/arbitrary/_std/env.rs#L89">https://github.com/AltSysrq/proptest/blob/d1c4b049337d2f75dd6f49a095115f7c532e5129/proptest/src/arbitrary/_std/env.rs#L89</a></p>



<a name="161519882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161519882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161519882">(Mar 23 2019 at 10:41)</a>:</h4>
<p>Created <a href="https://github.com/AltSysrq/proptest/issues/137" target="_blank" title="https://github.com/AltSysrq/proptest/issues/137">https://github.com/AltSysrq/proptest/issues/137</a> to support building proptest on webassembly</p>



<a name="161522986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161522986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161522986">(Mar 23 2019 at 12:05)</a>:</h4>
<p>Ok, so I think we should enable <code>default-features=false</code> for proptest, and after than maybe to find a work-around for wasm</p>



<a name="161523053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161523053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161523053">(Mar 23 2019 at 12:07)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span>  I'll open the PR for that</p>



<a name="161523104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161523104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161523104">(Mar 23 2019 at 12:08)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/pull/1025" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/1025">https://github.com/rust-analyzer/rust-analyzer/pull/1025</a>, already had the branch ready <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="161523121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%231021/near/161523121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.231021.html#161523121">(Mar 23 2019 at 12:09)</a>:</h4>
<p>r+ed!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>